package main

import (
	"learn-go-with-tests/ch16"
	"log"
	"net/http"
)

func main() {
	server := ch16.NewPlayerServer(ch16.NewInMemoryPlayerStore())
	handler := http.HandlerFunc(server.ServeHTTP)
	if err := http.ListenAndServe(":5000", handler); err != nil {
		log.Fatalf("could not listen on port 5000 %v", err)
	}
}
